import {
    Base
} from '../../utils/base'
const base = new Base()
class Order extends Base {
    constructor() {
        super()
    }

    /**
     * 获取订单列表
     */
    getOrderData(param) {
        return base.getRequest(`order`, param)
    }

    /**
     * 下单
     * @param {*} order 
     */
    placeOrder(order) {
        return base.postRequest(`pay`, order)
    }

    /**
     * 退款
     * @param {*} id 
     */
    refundOrder(id) {
        return base.putRequest(`refund/${id}`)
    }
}

export {
    Order
}